package au.com.handsunited.service;

import java.util.List;
import java.util.Map;

import org.springframework.security.userdetails.UserDetailsService;

import au.com.handsunited.exception.business.UsernameExistsException;
import au.com.handsunited.exception.business.UsernameNotFoundException;
import au.com.handsunited.model.User;
import au.com.handsunited.model.invitations.Invitation;
import au.com.handsunited.model.skill.Skill;


/**
 * @author Arun Chandrasekhar
 * @date 21/12/2006 9:58:30 AM
 */
public interface UserService extends UserDetailsService{


	User createUser(User user) throws UsernameExistsException;

	User updateUser(User user);

	boolean disableUser(String userId);

	User getUser(String id);

	User getUser(Long id);

	List<User> getAllUsers();

	List<User> getAllUsersPaginated(int firstResult, int maxResults);

	User findUserByUsername(String username);

	List<User> searchUsers(String firstName, String lastName, String emailAddress);

	List<User> findUsersWithSkills(List<Skill> skills, boolean allSkillsRequired);

	User resetPassword(String username) throws UsernameNotFoundException;

	Map<String, List<Invitation>> inviteUsers(User user, String emailAddresses, String message);

	User addUserToNetwork(User currentUser, String newUserId);

	boolean removeUserFromNetwork(User currentUser, String newUserId);

}
